package xyz.hubery.model;

import lombok.Data;
import xyz.hubery.domain.DepthItemVo;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * 盘口数据快照模型（缓存结构）
 */
@Data
public class DepthSnapshot {
    private final List<DepthItemVo> bids;
    private final List<DepthItemVo> asks;
    private final long timestamp;
    
    public DepthSnapshot(List<DepthItemVo> bids, List<DepthItemVo> asks, long timestamp) {
        this.bids = Collections.unmodifiableList(new ArrayList<>(bids));  // 防御性拷贝
        this.asks = Collections.unmodifiableList(new ArrayList<>(asks));
        this.timestamp = timestamp;
    }
    
}